//1 引入连接数据库的工具类
let mongoose = require('../util/dbUtile')
// 2 创建数据结构（用户的）
let snapshotSchema = mongoose.Schema({
    payNum:Number,
    commodtiy:[],
    payid:String,
    total:Number,
    preferential:String,
    note:String
});
//  snapshotModel.forEach(element => {
//     if(element.payNum=dingdan){
//         dingdan1.push(element)
//     }
//  });
// let d={payNum:2,commodtiy:[{name:"2121",dkf:"你好放大发"}],payid:"21321",total:3,preferential:"212",note:"2121"}


//3 创建数据的模型
let snapshotModel = mongoose.model('snapshotModel', snapshotSchema, "snapshot");
// snapshotModel.create(d)
//4 导出用户模型(***)
module.exports = snapshotModel